package conf

import (
	"github.com/spf13/viper"
	"go.uber.org/zap"
)

// BilinProdSection map toml [bilin-prod]
type BilinProdSection struct {
	Host  string
	Port  string
}

// ReadBilinAdmin get bilin-prod section from config
func ReadBilinProd(v *viper.Viper, slog *zap.SugaredLogger) (bilinProdConf BilinProdSection) {
	err := v.Unmarshal(&bilinProdConf)
	if err != nil {
		slog.Panicf("unable to decode into bilin-prod section, %v", err)
	}
	slog.Debug(bilinProdConf)
	return
}
